//
//  PassLoginView.m
//  groupProject
//
//  Created by mac on 15/12/17.
//  Copyright © 2015年 mac. All rights reserved.
//

#import "PassLoginView.h"
#import "InfoViewController.h"
#import "Config.h"
#import "LoginView.h"
#import "ReisgterView.h"
#import "PassLoginView.h"
@interface PassLoginView ()

@end

@implementation PassLoginView
{
    PassLoginView * PassView;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor lightTextColor];
    self.navigationItem.hidesBackButton = YES;
    self.navigationItem.title  = @"我的电商";
    [self addLabel];
    [self addButton];
    
}
-(void)addLabel{
    UILabel * labe1 = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/5.0, SCREEN_HEIGHT/5.0 *2, SCREEN_WIDTH, SCREEN_HEIGHT/9)];
    labe1.text = @"您还未登录，赶紧登录吧~";
    labe1.textColor = [UIColor blackColor];
    [self.view addSubview:labe1];
    
    UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/2,SCREEN_HEIGHT*0.5+SCREEN_WIDTH*0.1+10, 50, 15)];
    label2.text = @"or";
    [self.view addSubview:label2];
    
    
    
}
-(void)addButton{
    UIButton  * LoginBtn = [[UIButton alloc]initWithFrame:CGRectMake(SCREEN_WIDTH*0.05, SCREEN_HEIGHT*0.5,SCREEN_WIDTH*0.9, SCREEN_WIDTH*0.1)];
    [LoginBtn setTitle:@"立即登录" forState:UIControlStateNormal];
    [LoginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    LoginBtn.backgroundColor = [UIColor redColor];
    [LoginBtn.layer setMasksToBounds:YES];
    [LoginBtn.layer setCornerRadius:10.0];//设置矩形四个圆角半径
    [LoginBtn.layer setBorderWidth:1.0];//边框宽度
    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 1, 0, 0, 1 });
    [LoginBtn.layer setBorderColor:colorref];//边框颜色
    [self.view addSubview:LoginBtn];
    [LoginBtn addTarget:self action:@selector(LoginBtnClick) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton  * RegisterBtn = [[UIButton alloc]initWithFrame:CGRectMake(SCREEN_WIDTH*0.05, SCREEN_HEIGHT*0.5+SCREEN_WIDTH*0.1+35, SCREEN_WIDTH*0.9, SCREEN_WIDTH*0.1)];
    [RegisterBtn setTitle:@"注册" forState:UIControlStateNormal];
    [RegisterBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    RegisterBtn.backgroundColor = [UIColor whiteColor];
    [RegisterBtn.layer setMasksToBounds:YES];
    [RegisterBtn.layer setCornerRadius:10.0];//设置矩形四个圆角半径
    [RegisterBtn.layer setBorderWidth:1.0];//边框宽度
    CGColorSpaceRef colorSpace1 = CGColorSpaceCreateDeviceRGB();
    CGColorRef colorref1 = CGColorCreate(colorSpace1,(CGFloat[]){ 0, 0, 0,0 });
    [RegisterBtn.layer setBorderColor:colorref1];//边框颜色
    [self.view addSubview:RegisterBtn];
    [RegisterBtn addTarget:self action:@selector(RegisterBtnClick) forControlEvents:UIControlEventTouchUpInside];
}
-(void)LoginBtnClick{
    LoginView * logView = [[LoginView alloc]init];
    logView.LoginSwitchModel =YES;
    [self.navigationController pushViewController:logView animated:YES];
    
}
-(void)RegisterBtnClick{
    ReisgterView * ReisView = [[ReisgterView alloc]init];
    ReisView.ReisgterSwitchModel = YES;
    [self.navigationController pushViewController:ReisView animated:YES];
    // [self presentViewController:ReisView animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
